package fr.nbj.appli;

import android.graphics.drawable.Drawable;
import android.os.Bundle;

import com.google.android.maps.GeoPoint;
import com.google.android.maps.OverlayItem;

public class NbjMapItem extends OverlayItem{

	protected int id;
	protected int num;
	protected String description;
	//protected Bundle placeBundle;

	NbjMapItem(int id, int num, GeoPoint point, String title, String snippet, String descr/*, Bundle placeBundle*/){
		super(point, title, snippet);
		this.id = id;
		this.description = descr;
		this.num = num;
		//this.placeBundle = placeBundle;
	}

	@Override
	public Drawable getMarker(int stateBitset) {
		// TODO Auto-generated method stub
		return super.getMarker(stateBitset);
	}
	
	@Override
	public String toString() {
		return"[id="+id+" ,title="+getTitle()+" ,num="+num;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + id;
		result = prime * result + num;
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		NbjMapItem other = (NbjMapItem) obj;
		if (id != other.id)
			return false;
		if (num != other.num)
			return false;
		return true;
	}
	
	
}
